home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / SAT 2.3b4 / SAT 2.3b4 notes < prev    next >
Text File  |  1995-04-30  |  6KB  |  73 lines

  1. SAT 2.3 notes [PRELIMINARY]
  2. ==============
  3.  
  4. SAT 2.3 introduces CodeWarrior support, including PowerMac, and introduces plug-in blitters.
  5.  
  6. CodeWarrior:
  7. The main differences between using SAT with CodeWarrior compared to Think are:
  8. • In Pascal, the Toolbox doesn't auto-init as in Think Pascal.
  9. • Also in Pascal, MWP won't auto-include the basic Toolbox as in TP.
  10. • Both MWP and MWC use the same library.
  11. • QuickDraw globals must be prefixed "qd.".
  12. Not much, right?
  13.  
  14. Plug-in blitters:
  15. These were added for two reasons: Porting my old blitters to CodeWarrior was almost undoable, and the new system allows you to plug in your own blitters. Blitters are stored in resources of types 'RBlt' and 'MBlt', with ID's corresponding to the screen depth it is designed for (where 0 means a B/W non-color-QD blitter). PowerMac blitters are 'PRBl' and 'PMBl'.
  16. This means that:
  17. • If you have a blitter that you think is faster than mine, you can plug it in and try it. (Note: That is of course only possible after I publish a spec for the routines, which I will do when I feel sure that it won't change again soon.) For example, it is now possible to use compiled sprites in SAT.
  18. • If I or anyone else improve a blitter, the new one can be plugged into an existing SAT program without recompiling.
  19. • You can add yor own blitters for 16 and 32 bits (and even 2 bits, as if anyone would ever waste time on a 2-bit blitter.)
  20. • If your program doesn't use blitters anyway (i.e. it uses only QuickDraw) you can save a few kilobytes by excluding them.
  21. • Drawback: SAT now, again, includes some resources to include in the programs.
  22. • SAT is now, again, only ONE library and not two.
  23.  
  24. Extra feature:
  25. Sprites now have a "clip" field. It is useful when you want to use a clipping region for some sprites. Note that when clip is not nil, the sprite is drawn with QuickDraw, not with blitters.
  26.  
  27. PICT utilities:
  28. Some SAT programmers have had trouble with the backdrop PICTs.
  29.   First, SAT used to place the PICT with the origo the PICT has, which usually depends on its position in the drawing program. This was changed so that SAT always centers the PICT.
  30.   Second, many SAT programmers use far larger PICT resources than I use in the demos (which is reasonable - the final applications should be as pretty as possible while demos MUST be small) which often gave out-of-memory problems. SAT now draws its PICTs with the following memory-conservative procedures, which are also available for the target application: SATGetandDrawPICTRes (draws a PICT in its own rectangle), SATGetandDrawPICTResInRect (draws a PICT fit in the given rectangle), SATGetandCenterPICTResInRect (draws a PICT centered on the given rectangle).
  31.  
  32.  
  33. BUG FIXES:
  34. • Fixed a bug that made SATBackChanged (including calling it implicitly through SATPlotFace etc) incompatible with scrolling as in Zkrolly.
  35. • A bug in SATRun2…???
  36. • SATHideMBar now updates the menu bar area for you if you pass nil or gSAT.wind.port.
  37.  
  38. SAT now handles non-changing sprites! Try SATRun2 instead of SATRun! The demo "Bricks" demonstrate the difference. Note: SATRun2(true) will not work correctly with the current blitters for b/w and 4-bit graphics.
  39.  
  40.  
  41. API changes since 2.2 (changes below introduced with 2.3a2):
  42.  
  43. • SATShowMBar now takes a WindowPtr as parameter just like SATHideMBar. You should pass the same window. If you pass nil, the animation window (gSAT.wind.port) is used.
  44. • A new structure, the SATPort, is introduced. This structure combines the port and device of a port, plus a row start table that is used internally. This means that you rarely have to worry about GDevices any more (at least as long as you work on the main device). You usually pass the whole SATPort as parameter to routines, or the port. This simplifies several calls.
  45.     gSAT.wind, gSAT.offScreen and gSAT.backScreen all are SATPorts, so if you want to use SetPort (rather than SATSetPort) on them, or ShowWindow on gSAT.Wind, you must use the "port" valiable, e.g. SetPort(gSAT.offScreen.port), ShowWindow(gSAT.wind.port) or CopyBits(gSAT.offScreen.port.portBits, gSAT.wind.port.portBits, r, r, srcCopy, nil).
  46. • SATInitToolbox is added, as an optional way to get rid of the toolbox init part, for those of you who don't use Think Pascal.
  47. • The "SAT" prefix was put on some utilities that I had considered removing, but now finally decided to keep.
  48.  
  49. The blitter interface has changed since 2.3a1! You must replace the old blitters in your programs with new ones.
  50.  
  51. Changes to 2.3b:
  52.  
  53. • Universal interfaces used for all demos.
  54. • First native PPC blitter.
  55. • Most demos native.
  56. • Many parameters changed to "var" parameters. (With 68k, some parameters are sent by reference even if not var-declared, but this is not the case with PPC.)
  57.  
  58. Changes to 2.3b2:
  59. • PPC blitters complete for 8-bit, thanks to Bo Lindbergh, who wrote a mask blitter.
  60. • Fixes in the non-color-QD blitters (introduced with SATPorts). The ones provided with 2.3a2 are buggy.
  61. • Fixes a but in initialization that prevented SAT to operate on other screens than the main device. (This was introduced fairly recently, somewhere around 2.3a?)
  62. • Fixes a bug in the screen depth switching code (introduced with SATPorts).
  63.  
  64. Changes to 2.3b3:
  65. • Yet more fixes to 2nd screen support - finally, it works again!
  66. • A bugfix in the 8-bit 680x0 mask blitter (MBlt 8).
  67.  
  68. Changes to 2.3b4:
  69. • A bugfix in SATRun2. Before, it failed to update when a stationary sprite was removed.
  70. • Added a callback for redrawing faces, to be used for faces not loaded from 'cicn' resources. (Suggested by Nat Woods.)
  71. • Fixed a glitch in the menu bar hiding, causing garbage to be drawn at the top if the offscreens do not cover the menu bar.
  72. • Added "ThinkCStuffA.π" for Think C users who want to use MacTraps2. The difference from ThinkCStuff.π is that ThinkCStuffA.π doesn't include BitMapToRegionGlue.
  73.